package cn.stylefeng.guns.modular.single.entity;

import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 
 * 
 */@TableName(
        value = "disease_type",
        autoResultMap = true
)
@Data
public class DiseaseType implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    private Long id;

    /**
     * 病种名称
     */
    private String diseaseName;

    /**
     * 属性编码
     */
    private String diseaseCode;

    /**
     * 是否必填数：Y-是，N-否
     */
    private String notNull;

    /**
     * 备注
     */
    private String remark;

    /**
     * Y-是，N-否
     */
    private String hasTable;

    /**
     * Y-是，N-否
     */
    private String delFlag;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private Long createUser;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 修改人
     */
    private Long updateUser;

    /**
     * 是否启用：Y-是，N-否
     */
    private String isUse;

    private String type;

    /**
     * 示例
     */
    private String example;
    private Integer orderDesc;
    /**
     * 规则
     */
    private String rule;

    private String useType;
    private String title;
    private String submitName;

    private String  defaltValue;
    @TableField(exist = false)
    private List<String>  defaultValue;
    @TableField(exist = false)
    private Object  defaultValues;
    private String isDel;
    @TableField(exist = false)
    private List<SysDict> dictList;
    private String hisCode;
    private String diseaseGroup;
    private String parentName;
    private String parentValue;
    private String isNull;
    private String rootName;
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DiseaseType other = (DiseaseType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDiseaseName() == null ? other.getDiseaseName() == null : this.getDiseaseName().equals(other.getDiseaseName()))
            && (this.getDiseaseCode() == null ? other.getDiseaseCode() == null : this.getDiseaseCode().equals(other.getDiseaseCode()))
            && (this.getNotNull() == null ? other.getNotNull() == null : this.getNotNull().equals(other.getNotNull()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getHasTable() == null ? other.getHasTable() == null : this.getHasTable().equals(other.getHasTable()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getIsUse() == null ? other.getIsUse() == null : this.getIsUse().equals(other.getIsUse()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getExample() == null ? other.getExample() == null : this.getExample().equals(other.getExample()))
            && (this.getRule() == null ? other.getRule() == null : this.getRule().equals(other.getRule()))
            && (this.getUseType() == null ? other.getUseType() == null : this.getUseType().equals(other.getUseType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDiseaseName() == null) ? 0 : getDiseaseName().hashCode());
        result = prime * result + ((getDiseaseCode() == null) ? 0 : getDiseaseCode().hashCode());
        result = prime * result + ((getNotNull() == null) ? 0 : getNotNull().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getHasTable() == null) ? 0 : getHasTable().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getIsUse() == null) ? 0 : getIsUse().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getExample() == null) ? 0 : getExample().hashCode());
        result = prime * result + ((getRule() == null) ? 0 : getRule().hashCode());
        result = prime * result + ((getUseType() == null) ? 0 : getUseType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", diseaseName=").append(diseaseName);
        sb.append(", diseaseCode=").append(diseaseCode);
        sb.append(", notNull=").append(notNull);
        sb.append(", remark=").append(remark);
        sb.append(", hasTable=").append(hasTable);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", createTime=").append(createTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", isUse=").append(isUse);
        sb.append(", type=").append(type);
        sb.append(", example=").append(example);
        sb.append(", rule=").append(rule);
        sb.append(", useType=").append(useType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}